import http from "@/utils/http";


export const getPageTradeOrderApi = (queryPageParams) => {
  return http({
    url: "trade/tradeOrder/getPage",
    method: "GET",
    params:{
      pageNum: queryPageParams.pageNum,
      pageSize:queryPageParams.pageSize,
      orderCode:queryPageParams.orderCode,
      selectType:queryPageParams.selectType,
      start:queryPageParams.dateTime[0],
      end:queryPageParams.dateTime[1]
    }
  }
  )
};


export const refreshTradeOrderApi = (form) => {
  return http({
    url: "trade/tradeOrder/refresh",
    method:"POST",
    params:{
      start: form.dateTime[0],
      end:form.dateTime[1]
    }
  }
  )
};

export const getPageTradeOrderDetailApi = (queryPageParams) => {
  return http({
    url: "trade/tradeOrderDetail/getPage",
    method: "GET",
    params:{
      pageNum: queryPageParams.pageNum,
      pageSize:queryPageParams.pageSize,
      orderCode:queryPageParams.orderCode,
      goodsName:queryPageParams.goodsName,
      start:queryPageParams.dateTime[0],
      end:queryPageParams.dateTime[1]
    }
  }
  )
};
